﻿<Window x:Class="Serietheque.Fenetres.Preference"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
		xmlns:local="clr-namespace:Serietheque"
		 xmlns:Properties="clr-namespace:Serietheque.Properties"
		Title="Preference"
		WindowStyle="ToolWindow"
		ResizeMode="NoResize"
		WindowStartupLocation="CenterOwner"
		SizeToContent="WidthAndHeight">
	<Window.Resources>
		<local:InvertBoolConverter x:Key="invertBoolConverter"/>
	</Window.Resources>
	<Grid>
		<DockPanel>
			<TabControl  DockPanel.Dock="Top">
				<TabItem Header="Dossier">
					<StackPanel>
						<!--<Grid.RowDefinitions>
							<RowDefinition Height="*"/>
							<RowDefinition Height="*"/>
							<RowDefinition Height="*"/>
						</Grid.RowDefinitions>-->
						<StackPanel>
							<Label Content="Dossier de vos Series :" Margin="5" VerticalContentAlignment="Bottom"/>
							<StackPanel Orientation="Horizontal" Margin="5" Name="Serie">
								<TextBox Name="textBox1" Width="424" IsReadOnly="True" Text="{Binding Serie, Source={x:Static Properties:Settings.Default}}" />
								<Button Content="Parcourir" Name="serieBtn" Width="89" Margin="10,0,0,0" Click="parcourir_Click" />
							</StackPanel>
						</StackPanel>
						<StackPanel>
							<Label Content="Dossier des téléchargements :" Margin="5" VerticalContentAlignment="Bottom"/>
							<StackPanel Orientation="Horizontal" Margin="5" Name="SerieDl">
								<TextBox Name="tbSerieDl" Width="424" IsReadOnly="True" Text="{Binding SerieDl, Source={x:Static Properties:Settings.Default}}" />
								<Button Content="Parcourir" Name="serieDlBtn" Width="89" Margin="10,0,0,0" Click="parcourir_Click" />
							</StackPanel>
						</StackPanel>
						<StackPanel>
							<Label Content="Dossier de vos sous-titres :" Margin="5" VerticalContentAlignment="Bottom"/>
							<StackPanel Orientation="Horizontal" Margin="5" Name="SubDl">
								<TextBox Name="tbSubDl" Width="424" IsReadOnly="True" Text="{Binding SubDl, Source={x:Static Properties:Settings.Default}}" />
								<Button Content="Parcourir" Name="subDlBtn" Width="89" Margin="10,0,0,0" Click="parcourir_Click" />
							</StackPanel>
						</StackPanel>
						<StackPanel>
							<Label Content="Dossier où sera stocké le cache :" Margin="5" VerticalContentAlignment="Bottom"/>
							<StackPanel Orientation="Horizontal" Margin="5" Name="Cache">
								<TextBox Name="textBox2" Width="424" IsReadOnly="True" Text="{Binding Cache, Source={x:Static Properties:Settings.Default}}" />
								<Button Content="Parcourir" Name="cacheBtn" Width="89" Margin="10,0,0,0" Click="parcourir_Click" />
							</StackPanel>
						</StackPanel>
						<!--<StackPanel>
							<Label Content="Dossier où sera stocké le cache :" Margin="5" VerticalContentAlignment="Bottom"/>
							<StackPanel Orientation="Horizontal" Margin="5">
								<TextBox Name="textBox3" Width="424" IsReadOnly="True" Text="{Binding SubPath, Source={x:Static Properties:Settings.Default}}" />
								<Button Content="Parcourir" Name="subPathBtn" Width="89" Margin="10,0,0,0" Click="parcourir_Click" />
							</StackPanel>
						</StackPanel>-->
					</StackPanel>
				</TabItem>
				<TabItem Header="Follow">
					<StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Afficher l'option pour suivre les série" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding Follow}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Afficher les Episodes non possédés dans la vision tout" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding FollowViewAll}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Suivre seulement la dernière saison" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding FollowOnlyLast}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Mise à jours automatique" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding FollowAuto}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
					</StackPanel>
				</TabItem>
				<TabItem Header="Divers">
					<StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Maintenir le dossier Serie" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding MaitienDossier}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Afficher les Détail des Séries dans la vue détaillée" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding DetailSerie}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Charger les images des nouvelles séries directement à l'àjout de celle si" Width="406"/>
							<CheckBox IsChecked="{Binding local:SettingBinding ImgSerie}" HorizontalAlignment="Center" VerticalAlignment="Center" />
						</StackPanel>
						<StackPanel Orientation="Horizontal" Margin="5">
							<Label Content="Clé API TheTVDB" Width="177"/>
							<TextBox Text="{Binding local:SettingBinding ApiKey}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="247" />
						</StackPanel>
						<Button Content="Consolidation" Width="89" Margin="10,0,0,0" Click="consolidationBtn_Click" />
					</StackPanel>
				</TabItem>

			</TabControl>
			<StackPanel Orientation="Horizontal" FlowDirection="RightToLeft">
				<Button Content="Annuler" Height="23" Width="75" IsCancel="True" />
				<Button Content="Ok" Height="23" Width="75" Click="ok_Click" IsDefault="True" />
			</StackPanel>
		</DockPanel>
	</Grid>
</Window>